#pragma once
#include "stdafx.h"
#include "QueueBuffer.h"
#include "Element.h"
#include "Operator.h"
#include <boost/shared_ptr.hpp>

class QueueEntity
{
private:
	boost::shared_ptr<QueueBuffer> buffer;
	Timestamp oldestTimestamp;
	boost::shared_ptr<Operator>inputOperator;
	boost::shared_ptr<Operator>outputOperator;
#ifdef DEBUG
	std::string id;
#endif
	
public:
	QueueEntity(void);
	~QueueEntity(void);

	void enqueue(Element& element);
	void dequeue(Element& element);  
	void dequeue(void);
	void peek(Element& element); 

	bool isEmpty(void);
	bool isFull(void);
#ifdef DEBUG
	void setId(std::string id);
	std::string getId(void);
#endif
	void setInputOperator(boost::shared_ptr<Operator> inputOperator);
	void setOutputOperator(boost::shared_ptr<Operator> outputOperator);
	boost::shared_ptr<Operator> getInputOperator();
	boost::shared_ptr<Operator> getOutputOperator();
};

